﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Ivy.Common.Framework.GeneralUtility;

namespace DasIdeen.UserControls
{
    public partial class CommentControl : System.Web.UI.UserControl
    {
        #region  Variable & constant
        #endregion  Variable & constant

        #region Constructor & Destructor
        #endregion Constructor & Destructor

        #region Properties
        #endregion Properties

        #region Public Methods
        #endregion Public Methods

        #region Events
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        protected void btnPostComment_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.txtName.Text != "" && this.txtEmail.Text != "")
                {
                    if (this.txtMessage.Text != "")
                    {
                        Response.Redirect("~/Default.aspx");
                    }
                    else
                    {
                        this.lblMessageError.ForeColor = System.Drawing.Color.Red;
                        this.lblMessageError.Text = "Can't be blank,please give your valuable Message to us";
                        this.lblErrorMessage.Text = string.Empty;
                    }
                }
                else
                {
                    this.lblErrorMessage.ForeColor = System.Drawing.Color.Red;
                    this.lblErrorMessage.Text = "Can't be blank Name or Email id";
                    this.lblMessageError.Text = string.Empty;
                }
            }
            catch (Exception ex)
            {
                ExceptionUtility.ExceptionHandler(ex, Server.MapPath("~/"));
            }
        }
        #endregion Events

        #region Private Methods
        private void CheckUserAutherization()
        {
        }

        private void ClearScreen()
        {
            this.lblErrorMessage.Text = "";
            this.lblMessageError.Text = "";
        }

        private void InitializeScreen()
        {
            ClearScreen();
            FillLoadLookUpData();
        }

        private void FillLoadLookUpData()
        {
        }

        private void TranslateEntityToUIControls()
        {
        }

        private void TranslateUIControlsToEntity()
        {
        }
        #endregion Private Methods      
        
    }
}